import java.util.Random;

public class demo5 {
    public static void main(String[] args) {
        int[] arry = {1,2,3,4,5,6,7};
        Random r = new Random();
        for (int i = 0; i < arry.length; i++) {
            int index = r.nextInt(arry.length);
            int temp = arry[i];
            arry[i] = arry[index];
            arry[index] = temp;
        }

        for (int i = 0; i < arry.length; i++) {
            System.out.print(arry[i]+ " ");
        }
    }
}
